﻿using System;

namespace TempEmployees.BLL.Validations
{
    public class PhoneNumber
    {
        private string m_number;

        public PhoneNumber(string number)
        {
            m_number = number;
            if (!IsValid(m_number)) throw new ValidationErrorException();
        }

        public override string ToString()
        {
            return m_number;
        }

        public static bool IsValid(string number)
        {
            return true;
        }

        public static bool IsValid(object data)
        {
            return IsValid(data as string);
        }
    }
}